inherited fmReturnFood: TfmReturnFood
  Left = 479
  Top = 195
  Width = 1036
  Height = 522
  Caption = #1042#1086#1079#1074#1088#1072#1090#1099' '#1087#1086' '#1087#1080#1090#1072#1085#1080#1102
  Constraints.MinHeight = 522
  Constraints.MinWidth = 1036
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 457
    Width = 1020
  end
  inherited Panel1: TPanel
    Width = 1020
    Visible = False
    inherited BitBtn1: TBitBtn
      Left = 858
    end
    inherited BitBtn2: TBitBtn
      Left = 946
    end
  end
  object ToolBar1: TToolBar [2]
    Left = 0
    Top = 45
    Width = 1020
    Height = 29
    ButtonWidth = 26
    Caption = 'ToolBar1'
    Images = DMInv.ilActive
    TabOrder = 2
    DesignSize = (
      1020
      27)
    object tbAddRF: TToolButton
      Left = 0
      Top = 2
      Hint = #1057#1086#1079#1076#1072#1090#1100' '#1079#1072#1103#1074#1083#1077#1085#1080#1077
      Caption = 'tbAddRF'
      ImageIndex = 28
      ParentShowHint = False
      ShowHint = True
      OnClick = tbAddRFClick
    end
    object tbEditRF: TToolButton
      Left = 26
      Top = 2
      Hint = #1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1090#1100' '#1079#1072#1103#1074#1083#1077#1085#1080#1077
      Caption = 'tbEditRF'
      ImageIndex = 2
      ParentShowHint = False
      ShowHint = True
      OnClick = tbEditRFClick
    end
    object tbDelRF: TToolButton
      Left = 52
      Top = 2
      Hint = #1059#1076#1072#1083#1080#1090#1100' '#1079#1072#1103#1074#1083#1077#1085#1080#1077
      Caption = 'tbDelRF'
      ImageIndex = 29
      ParentShowHint = False
      ShowHint = True
      OnClick = tbDelRFClick
    end
    object tbRefresh: TToolButton
      Left = 78
      Top = 2
      Caption = 'tbRefresh'
      ImageIndex = 8
      OnClick = tbRefreshClick
    end
    object ToolButton1: TToolButton
      Left = 104
      Top = 2
      Width = 8
      Caption = 'ToolButton1'
      ImageIndex = 30
      Style = tbsSeparator
    end
    object cxLabel1: TcxLabel
      Left = 112
      Top = 4
      Caption = #1044#1072#1090#1072' '#1087#1088#1080#1089'. '#1074' '#1086#1073#1088#1072#1079'. '#1087#1086#1076#1088#1072#1079#1076'.'
    end
    object edDate: TcxDateEdit
      Left = 267
      Top = 2
      EditValue = 40922d
      ParentFont = False
      Properties.OnChange = edDatePropertiesChange
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -13
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 0
      Width = 121
    end
    object cbAll: TcxCheckBox
      Left = 388
      Top = 2
      Caption = #1042#1089#1077' '#1079#1072#1103#1074#1083#1077#1085#1080#1103
      Properties.OnChange = cbAllPropertiesChange
      TabOrder = 2
      Width = 98
    end
    object cbVozvr: TcxComboBox
      Left = 486
      Top = 2
      Properties.Items.Strings = (
        #1042#1086#1079#1074#1088#1072#1097#1077#1085#1086
        #1053#1077' '#1074#1086#1079#1074#1088#1072#1097#1077#1085#1086
        #1054#1090#1082#1072#1079#1072#1085#1086)
      Properties.OnChange = cbVozvrPropertiesChange
      TabOrder = 6
      Text = #1053#1077' '#1074#1086#1079#1074#1088#1072#1097#1077#1085#1086
      Width = 121
    end
    object ToolButton3: TToolButton
      Left = 607
      Top = 2
      Width = 8
      Caption = 'ToolButton3'
      ImageIndex = 31
      Style = tbsSeparator
    end
    object bOtkazat: TcxButton
      Left = 615
      Top = 2
      Width = 75
      Height = 22
      Anchors = [akTop, akRight]
      Caption = #1054#1090#1082#1072#1079#1072#1090#1100
      TabOrder = 7
      OnClick = bOtkazatClick
      LookAndFeel.SkinName = 'Office2007Pink'
    end
    object bVypl: TcxButton
      Left = 690
      Top = 2
      Width = 75
      Height = 22
      Anchors = [akTop, akRight]
      Caption = #1042#1099#1087#1083#1072#1090#1080#1090#1100
      TabOrder = 3
      Visible = False
      OnClick = bVyplClick
      LookAndFeel.SkinName = 'Blue'
    end
    object ToolButton2: TToolButton
      Left = 765
      Top = 2
      Width = 8
      Caption = 'ToolButton2'
      ImageIndex = 32
      Style = tbsSeparator
    end
    object bvyplInujusummu: TcxButton
      Left = 773
      Top = 2
      Width = 146
      Height = 22
      Anchors = [akTop, akRight]
      Caption = #1042#1099#1087#1083#1072#1090#1080#1090#1100' '#1080#1085#1091#1102' '#1089#1091#1084#1084#1091
      TabOrder = 4
      Visible = False
      OnClick = bvyplInujusummuClick
      LookAndFeel.SkinName = 'Blue'
    end
    object bGridCust: TcxButton
      Tag = 12
      Left = 919
      Top = 2
      Width = 27
      Height = 22
      Hint = #1050#1086#1083#1086#1085#1082#1080' '#1090#1072#1073#1083#1080#1094#1099
      ParentShowHint = False
      ShowHint = True
      TabOrder = 5
      TabStop = False
      Visible = False
      OnClick = bGridCustClick
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        04000000000000010000120B0000120B00001000000000000000000000000000
        80000080000000808000800000008000800080800000C0C0C000808080000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
        33333FFFFFFFFFFFFFFF000000000000000088888888888888880FFFFFFFFFFF
        FFF08F3FF3FF3FF7FFF80F00F00F00F900F08F883883883788380FFFFFFFF9FF
        FFF08F3FF3FF37F3FFF80F00F00F09F000F08F883883873888380FFFFFFFF99F
        FFF08F3FF3FF3773FFF80F00F99909F000F08F883777873888380FFFF9FFF999
        FFF08F3FF7FF3777FFF80F00F99F00F000F08F88377388388838099FF9FFFFFF
        FFF0877FF7FFFFFFFFF809C9C999CCCCCCC087878777888888880979CCCCCCCC
        C77087F7888888888FF809090000000000008787888888888888399333333333
        3333377333333333333333333333333333333333333333333333}
      LookAndFeel.SkinName = 'Blue'
      NumGlyphs = 2
    end
  end
  object dbgRF: TcxGrid [3]
    Left = 0
    Top = 74
    Width = 1020
    Height = 383
    Align = alClient
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 3
    LookAndFeel.Kind = lfStandard
    LookAndFeel.SkinName = 'Blue'
    object tvRF: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.PriorPage.Visible = True
      NavigatorButtons.Next.Visible = True
      NavigatorButtons.Insert.Visible = True
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = True
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      FilterBox.Position = fpTop
      OnCellDblClick = tvRFCellDblClick
      DataController.DataSource = dlgDS
      DataController.Summary.DefaultGroupSummaryItems = <
        item
          Format = '#,###0'
          Kind = skSum
          FieldName = 'KVYPLATE'
          Column = tvRFKVYPLATE
        end>
      DataController.Summary.FooterSummaryItems = <
        item
          Format = '#,###0'
          Kind = skSum
          FieldName = 'KVYPLATE'
          Column = tvRFKVYPLATE
        end
        item
          Kind = skCount
          FieldName = 'RFID'
          Column = tvRFRFID
        end>
      DataController.Summary.SummaryGroups = <>
      Filtering.ColumnFilteredItemsList = True
      OptionsBehavior.CellHints = True
      OptionsBehavior.IncSearch = True
      OptionsData.CancelOnExit = False
      OptionsData.Editing = False
      OptionsView.CellEndEllipsis = True
      OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
      OptionsView.CellAutoHeight = True
      OptionsView.CellTextMaxLineCount = 1
      OptionsView.ColumnAutoWidth = True
      OptionsView.Footer = True
      OptionsView.GroupFooters = gfVisibleWhenExpanded
      OptionsView.HeaderEndEllipsis = True
      OptionsView.Indicator = True
      Preview.Visible = True
      Styles.Header = DMInv.cxSiniyText
      object tvRFRFID: TcxGridDBColumn
        Caption = #8470' '#1087'/'#1087
        DataBinding.FieldName = 'RFID'
        Width = 21
      end
      object tvRFPOLUCH_USL: TcxGridDBColumn
        Caption = #1055#1086#1083#1091#1095'. '#1091#1089#1083'.'
        DataBinding.FieldName = 'POLUCH_USL'
        Width = 37
      end
      object tvRFRFDATE: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1088#1077#1075#1080#1089#1090#1088'.'
        DataBinding.FieldName = 'RFDATE'
        Width = 42
      end
      object tvRFRFDATEBEGIN: TcxGridDBColumn
        Caption = #1053#1072#1095#1072#1083#1086' '#1087#1077#1088'.'
        DataBinding.FieldName = 'RFDATEBEGIN'
        Width = 38
      end
      object tvRFRFDATEEND: TcxGridDBColumn
        Caption = #1050#1086#1085#1077#1094' '#1087#1077#1088'.'
        DataBinding.FieldName = 'RFDATEEND'
        Width = 35
      end
      object tvRFPP: TcxGridDBColumn
        Caption = #1053#1072#1087#1080#1089#1072#1083' '#1079#1072#1103#1074#1083'.'
        DataBinding.FieldName = 'PP'
        Width = 46
      end
      object tvRFKVYPLATE: TcxGridDBColumn
        Caption = #1042#1077#1088#1085#1091#1090#1100
        DataBinding.FieldName = 'KVYPLATE'
        Width = 27
      end
      object tvRFRFVYPLACHENO: TcxGridDBColumn
        Caption = #1042#1086#1079#1074#1088#1072#1097#1077#1085#1086
        DataBinding.FieldName = 'RFVYPLACHENO'
        Width = 37
      end
      object tvRFRFNOTEVYPL: TcxGridDBColumn
        Caption = #1050#1086#1084#1084#1077#1085#1090' '#1082' '#1074#1099#1087#1083#1072#1090#1077
        DataBinding.FieldName = 'RFNOTEVYPL'
        Width = 58
      end
      object tvRFRFNOTE: TcxGridDBColumn
        Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
        DataBinding.FieldName = 'RFNOTE'
        Width = 47
      end
      object tvRFPP_UE: TcxGridDBColumn
        Caption = #1040#1074#1090#1086#1088
        DataBinding.FieldName = 'PP_UE'
        Width = 27
      end
      object tvRFPP_UEDIT: TcxGridDBColumn
        Caption = #1056#1077#1076#1072#1082#1090#1086#1088
        DataBinding.FieldName = 'PP_UEDIT'
        Width = 40
      end
      object tvRFPRICHINA: TcxGridDBColumn
        Caption = #1055#1088#1080#1095#1080#1085#1072
        DataBinding.FieldName = 'PRICHINA'
        Width = 37
      end
      object tvRFKOLWDAY: TcxGridDBColumn
        Caption = #1050#1086#1083'. '#1088#1072#1073'. '#1076#1085#1077#1081
        DataBinding.FieldName = 'KOLWDAY'
        Width = 66
      end
      object tvRFKOL: TcxGridDBColumn
        Caption = #1044#1085#1077#1081' '#1085#1077#1087#1086#1089#1077#1097'.'
        DataBinding.FieldName = 'KOL'
        Width = 74
      end
      object tvRFDEN_PITANIYA: TcxGridDBColumn
        Caption = #1058#1072#1088#1080#1092
        DataBinding.FieldName = 'DEN_PITANIYA'
        Width = 38
      end
      object tvRFOTKAZ: TcxGridDBColumn
        Caption = #1054#1090#1082#1072#1079
        DataBinding.FieldName = 'OTKAZ'
      end
    end
    object cxGridLevel2: TcxGridLevel
      GridView = tvRF
    end
  end
  object Panel2: TPanel [4]
    Left = 551
    Top = 72
    Width = 321
    Height = 145
    TabOrder = 4
    Visible = False
    object eAmount: TcxMaskEdit
      Left = 121
      Top = 34
      ParentFont = False
      Properties.MaskKind = emkRegExpr
      Properties.EditMask = '\d+'
      Properties.MaxLength = 0
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -13
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 0
      Width = 72
    end
    object cxLabel2: TcxLabel
      Left = 6
      Top = 53
      Caption = #1050#1086#1084#1084#1077#1085#1090'.'
    end
    object eNote: TcxTextEdit
      Left = 8
      Top = 74
      ParentFont = False
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -13
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 2
      Width = 305
    end
    object bVyplOk: TcxButton
      Left = 65
      Top = 106
      Width = 56
      Height = 23
      Caption = #1054#1050
      TabOrder = 3
      OnClick = bVyplOkClick
      Glyph.Data = {
        BE060000424DBE06000000000000360400002800000024000000120000000100
        0800000000008802000000000000000000000001000000000000000000000000
        80000080000000808000800000008000800080800000C0C0C000C0DCC000F0C8
        A400000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        000000000000000000000000000000000000F0FBFF00A4A0A000808080000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00030303030303
        0303030303030303030303030303030303030303030303030303030303030303
        03030303030303030303030303030303030303030303FF030303030303030303
        03030303030303040403030303030303030303030303030303F8F8FF03030303
        03030303030303030303040202040303030303030303030303030303F80303F8
        FF030303030303030303030303040202020204030303030303030303030303F8
        03030303F8FF0303030303030303030304020202020202040303030303030303
        0303F8030303030303F8FF030303030303030304020202FA0202020204030303
        0303030303F8FF0303F8FF030303F8FF03030303030303020202FA03FA020202
        040303030303030303F8FF03F803F8FF0303F8FF03030303030303FA02FA0303
        03FA0202020403030303030303F8FFF8030303F8FF0303F8FF03030303030303
        FA0303030303FA0202020403030303030303F80303030303F8FF0303F8FF0303
        0303030303030303030303FA0202020403030303030303030303030303F8FF03
        03F8FF03030303030303030303030303FA020202040303030303030303030303
        0303F8FF0303F8FF03030303030303030303030303FA02020204030303030303
        03030303030303F8FF0303F8FF03030303030303030303030303FA0202020403
        030303030303030303030303F8FF0303F8FF03030303030303030303030303FA
        0202040303030303030303030303030303F8FF03F8FF03030303030303030303
        03030303FA0202030303030303030303030303030303F8FFF803030303030303
        030303030303030303FA0303030303030303030303030303030303F803030303
        0303030303030303030303030303030303030303030303030303030303030303
        0303}
      NumGlyphs = 2
    end
    object cxLabel3: TcxLabel
      Left = 138
      Top = 8
      Caption = #1057#1091#1084#1084#1072
    end
    object cxButton1: TcxButton
      Left = 193
      Top = 106
      Width = 80
      Height = 23
      Caption = #1054#1090#1084#1077#1085#1072
      TabOrder = 5
      OnClick = cxButton1Click
    end
  end
  inherited dlgDS: TDataSource
    DataSet = qRF
  end
  object qRF: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      
        'SELECT DISTINCT RF.*, p.PLASTNAME||'#39' '#39'||SUBSTRING(p.PNAME FROM 1' +
        ' FOR 1 )||'#39'. '#39'||'
      
        'COALESCE(SUBSTRING(p.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39') AS polu' +
        'ch_usl,'
      'p1.PLASTNAME||'#39' '#39'||SUBSTRING(p1.PNAME FROM 1 FOR 1 )||'#39'. '#39'||'
      'COALESCE(SUBSTRING(p1.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39') AS PP,'
      'p2.PLASTNAME||'#39' '#39'||SUBSTRING(p2.PNAME FROM 1 FOR 1 )||'#39'. '#39'||'
      
        'COALESCE(SUBSTRING(p2.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39') AS PP_' +
        'ue,'
      'p3.PLASTNAME||'#39' '#39'||SUBSTRING(p3.PNAME FROM 1 FOR 1 )||'#39'. '#39'||'
      
        'COALESCE(SUBSTRING(p3.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39') AS PP_' +
        'uedit,'
      
        'RF1.RFVYPLACHENO, rf1.RFNOTEVYPL, IIF( COALESCE(rf1.RFISOTKAZ,0)' +
        ' = 1, '#39#1054#1090#1082#1072#1079#39', '#39' '#39') AS otkaz'
      'FROM RET_FOOD RF'
      'INNER JOIN PEOPLE P ON P.PID = RF.PID_POLUCH'
      'INNER JOIN PEOPLE P1 ON P1.PID = RF.PID'
      'INNER JOIN RETURN_FOOD RF1 ON RF1.RFID = RF.RFID'
      'LEFT OUTER JOIN USERS ue ON ue.USNAME = RF1.RFUSERENTER'
      'LEFT OUTER JOIN PEOPLE P2 ON P2.PID = ue.PID'
      'INNER JOIN RETURN_FOOD RF2 ON RF2.RFID = RF.RFID'
      'LEFT OUTER JOIN USERS ued ON ued.USNAME = RF2.RFUSEREDIT'
      'LEFT OUTER JOIN PEOPLE P3 ON P3.PID = ued.PID')
    Left = 296
    object qRFPID_POLUCH: TIntegerField
      FieldName = 'PID_POLUCH'
      Origin = '"RET_FOOD"."PID_POLUCH"'
    end
    object qRFRFID: TIntegerField
      FieldName = 'RFID'
      Origin = '"RET_FOOD"."RFID"'
      Required = True
    end
    object qRFRFDATE: TDateField
      FieldName = 'RFDATE'
      Origin = '"RET_FOOD"."RFDATE"'
    end
    object qRFPID: TIntegerField
      FieldName = 'PID'
      Origin = '"RET_FOOD"."PID"'
    end
    object qRFRFDATEBEGIN: TDateField
      FieldName = 'RFDATEBEGIN'
      Origin = '"RET_FOOD"."RFDATEBEGIN"'
    end
    object qRFRFDATEEND: TDateField
      FieldName = 'RFDATEEND'
      Origin = '"RET_FOOD"."RFDATEEND"'
    end
    object qRFKVYPLATE: TIBBCDField
      FieldName = 'KVYPLATE'
      Origin = '"RET_FOOD"."KVYPLATE"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qRFPOLUCH_USL: TIBStringField
      FieldName = 'POLUCH_USL'
      ProviderFlags = []
      Size = 769
    end
    object qRFPP: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 769
    end
    object qRFPP_UE: TIBStringField
      FieldName = 'PP_UE'
      ProviderFlags = []
      Size = 769
    end
    object qRFPP_UEDIT: TIBStringField
      FieldName = 'PP_UEDIT'
      ProviderFlags = []
      Size = 769
    end
    object qRFRFNOTE: TIBStringField
      FieldName = 'RFNOTE'
      Origin = '"RET_FOOD"."RFNOTE"'
      Size = 255
    end
    object qRFPRICHINA: TIBStringField
      FieldName = 'PRICHINA'
      Origin = '"RET_FOOD"."PRICHINA"'
      Size = 255
    end
    object qRFKOLWDAY: TIntegerField
      FieldName = 'KOLWDAY'
      Origin = '"RET_FOOD"."KOLWDAY"'
    end
    object qRFKOL: TIntegerField
      FieldName = 'KOL'
      Origin = '"RET_FOOD"."KOL"'
    end
    object qRFDEN_PITANIYA: TIBBCDField
      FieldName = 'DEN_PITANIYA'
      Origin = '"RET_FOOD"."DEN_PITANIYA"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qRFRFVYPLACHENO: TIBBCDField
      FieldName = 'RFVYPLACHENO'
      Origin = '"RETURN_FOOD"."RFVYPLACHENO"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qRFRFNOTEVYPL: TIBStringField
      FieldName = 'RFNOTEVYPL'
      Origin = '"RETURN_FOOD"."RFNOTEVYPL"'
      Size = 255
    end
    object qRFOTKAZ: TIBStringField
      FieldName = 'OTKAZ'
      ProviderFlags = []
      FixedChar = True
      Size = 5
    end
  end
  object sqldelRF: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      
        'update RETurn_FOOD RF set rf.rfisdelete = 1 where rf.rfid = :rfi' +
        'd')
    Transaction = DMInv.IBTransaction1
    Left = 216
  end
  object cxPropertiesStore1: TcxPropertiesStore
    Components = <
      item
        Component = edDate
        Properties.Strings = (
          'Date')
      end
      item
        Component = tvRF
        Properties.Strings = (
          'BackgroundBitmaps'
          'DataController'
          'DateTimeHandling'
          'DragMode'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FilterBox'
          'Filtering'
          'FilterRow'
          'Name'
          'NavigatorButtons'
          'NewItemRow'
          'OptionsBehavior'
          'OptionsCustomize'
          'OptionsData'
          'OptionsSelection'
          'OptionsView'
          'PopupMenu'
          'Preview'
          'Styles'
          'Synchronization'
          'Tag')
      end
      item
        Component = tvRFDEN_PITANIYA
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFKOL
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFKOLWDAY
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFKVYPLATE
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFPOLUCH_USL
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFPP
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFPP_UE
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFPP_UEDIT
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFPRICHINA
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFRFDATE
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFRFDATEBEGIN
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFRFDATEEND
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFRFID
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFRFNOTE
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFRFNOTEVYPL
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRFRFVYPLACHENO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end>
    StorageName = #1048#1057' '#1054#1083#1080#1084#1087#1080#1082'_PS_fmReturnFood'
    StorageType = stRegistry
    Left = 464
    Top = 176
  end
  object qTemp: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      
        'SELECT DISTINCT RF.*, p.PLASTNAME||'#39' '#39'||SUBSTRING(p.PNAME FROM 1' +
        ' FOR 1 )||'#39'. '#39'||'
      
        'COALESCE(SUBSTRING(p.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39') AS polu' +
        'ch_usl,'
      'p1.PLASTNAME||'#39' '#39'||SUBSTRING(p1.PNAME FROM 1 FOR 1 )||'#39'. '#39'||'
      'COALESCE(SUBSTRING(p1.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39') AS PP,'
      'p2.PLASTNAME||'#39' '#39'||SUBSTRING(p2.PNAME FROM 1 FOR 1 )||'#39'. '#39'||'
      
        'COALESCE(SUBSTRING(p2.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39') AS PP_' +
        'ue,'
      'p3.PLASTNAME||'#39' '#39'||SUBSTRING(p3.PNAME FROM 1 FOR 1 )||'#39'. '#39'||'
      
        'COALESCE(SUBSTRING(p3.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39') AS PP_' +
        'uedit,'
      
        'RF1.RFVYPLACHENO, rf1.RFNOTEVYPL, IIF( COALESCE(rf1.RFISOTKAZ,0)' +
        ' = 1, '#39#1054#1090#1082#1072#1079#39', '#39' '#39') AS otkaz'
      'FROM RET_FOOD RF'
      'INNER JOIN PEOPLE P ON P.PID = RF.PID_POLUCH'
      'INNER JOIN PEOPLE P1 ON P1.PID = RF.PID'
      'INNER JOIN RETURN_FOOD RF1 ON RF1.RFID = RF.RFID'
      'LEFT OUTER JOIN USERS ue ON ue.USNAME = RF1.RFUSERENTER'
      'LEFT OUTER JOIN PEOPLE P2 ON P2.PID = ue.PID'
      'INNER JOIN RETURN_FOOD RF2 ON RF2.RFID = RF.RFID'
      'LEFT OUTER JOIN USERS ued ON ued.USNAME = RF2.RFUSEREDIT'
      'LEFT OUTER JOIN PEOPLE P3 ON P3.PID = ued.PID')
    Left = 296
    Top = 32
    object IntegerField1: TIntegerField
      FieldName = 'PID_POLUCH'
      Origin = '"RET_FOOD"."PID_POLUCH"'
    end
    object IntegerField2: TIntegerField
      FieldName = 'RFID'
      Origin = '"RET_FOOD"."RFID"'
      Required = True
    end
    object DateField1: TDateField
      FieldName = 'RFDATE'
      Origin = '"RET_FOOD"."RFDATE"'
    end
    object IntegerField3: TIntegerField
      FieldName = 'PID'
      Origin = '"RET_FOOD"."PID"'
    end
    object DateField2: TDateField
      FieldName = 'RFDATEBEGIN'
      Origin = '"RET_FOOD"."RFDATEBEGIN"'
    end
    object DateField3: TDateField
      FieldName = 'RFDATEEND'
      Origin = '"RET_FOOD"."RFDATEEND"'
    end
    object IBBCDField1: TIBBCDField
      FieldName = 'KVYPLATE'
      Origin = '"RET_FOOD"."KVYPLATE"'
      Precision = 18
      Size = 2
    end
    object IBStringField1: TIBStringField
      FieldName = 'POLUCH_USL'
      ProviderFlags = []
      Size = 769
    end
    object IBStringField2: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 769
    end
    object IBStringField3: TIBStringField
      FieldName = 'PP_UE'
      ProviderFlags = []
      Size = 769
    end
    object IBStringField4: TIBStringField
      FieldName = 'PP_UEDIT'
      ProviderFlags = []
      Size = 769
    end
    object IBStringField5: TIBStringField
      FieldName = 'RFNOTE'
      Origin = '"RET_FOOD"."RFNOTE"'
      Size = 255
    end
    object IBStringField6: TIBStringField
      FieldName = 'PRICHINA'
      Origin = '"RET_FOOD"."PRICHINA"'
      Size = 255
    end
    object IntegerField4: TIntegerField
      FieldName = 'KOLWDAY'
      Origin = '"RET_FOOD"."KOLWDAY"'
    end
    object IntegerField5: TIntegerField
      FieldName = 'KOL'
      Origin = '"RET_FOOD"."KOL"'
    end
    object IBBCDField2: TIBBCDField
      FieldName = 'DEN_PITANIYA'
      Origin = '"RET_FOOD"."DEN_PITANIYA"'
      Precision = 18
      Size = 2
    end
  end
  object qAddBalance: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      
        'EXECUTE PROCEDURE ADDBALANCE_RETFOOD (:pid_poluch, :data_zayavl,' +
        ':amount, :rfid, :note, :date_begin, :date_end)')
    Left = 496
    Top = 8
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'pid_poluch'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data_zayavl'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'amount'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'rfid'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'note'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_begin'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_end'
        ParamType = ptUnknown
      end>
    object IntegerField6: TIntegerField
      FieldName = 'PID_POLUCH'
      Origin = '"RET_FOOD"."PID_POLUCH"'
    end
    object IntegerField7: TIntegerField
      FieldName = 'RFID'
      Origin = '"RET_FOOD"."RFID"'
      Required = True
    end
    object DateField4: TDateField
      FieldName = 'RFDATE'
      Origin = '"RET_FOOD"."RFDATE"'
    end
    object IntegerField8: TIntegerField
      FieldName = 'PID'
      Origin = '"RET_FOOD"."PID"'
    end
    object DateField5: TDateField
      FieldName = 'RFDATEBEGIN'
      Origin = '"RET_FOOD"."RFDATEBEGIN"'
    end
    object DateField6: TDateField
      FieldName = 'RFDATEEND'
      Origin = '"RET_FOOD"."RFDATEEND"'
    end
    object IBBCDField3: TIBBCDField
      FieldName = 'KVYPLATE'
      Origin = '"RET_FOOD"."KVYPLATE"'
      Precision = 18
      Size = 2
    end
    object IBStringField7: TIBStringField
      FieldName = 'POLUCH_USL'
      ProviderFlags = []
      Size = 769
    end
    object IBStringField8: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 769
    end
    object IBStringField9: TIBStringField
      FieldName = 'PP_UE'
      ProviderFlags = []
      Size = 769
    end
    object IBStringField10: TIBStringField
      FieldName = 'PP_UEDIT'
      ProviderFlags = []
      Size = 769
    end
    object IBStringField11: TIBStringField
      FieldName = 'RFNOTE'
      Origin = '"RET_FOOD"."RFNOTE"'
      Size = 255
    end
    object IBStringField12: TIBStringField
      FieldName = 'PRICHINA'
      Origin = '"RET_FOOD"."PRICHINA"'
      Size = 255
    end
    object IntegerField9: TIntegerField
      FieldName = 'KOLWDAY'
      Origin = '"RET_FOOD"."KOLWDAY"'
    end
    object IntegerField10: TIntegerField
      FieldName = 'KOL'
      Origin = '"RET_FOOD"."KOL"'
    end
    object IBBCDField4: TIBBCDField
      FieldName = 'DEN_PITANIYA'
      Origin = '"RET_FOOD"."DEN_PITANIYA"'
      Precision = 18
      Size = 2
    end
    object IBBCDField5: TIBBCDField
      FieldName = 'RFVYPLACHENO'
      Origin = '"RETURN_FOOD"."RFVYPLACHENO"'
      Precision = 18
      Size = 2
    end
  end
  object sqlOtkazat: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      'UPDATE RETURN_FOOD RF SET RF.RFISOTKAZ = 1'
      'WHERE RF.RFID = :RFID AND RF.RFISOTKAZ IS NULL')
    Transaction = DMInv.IBTransaction1
    Left = 648
    Top = 16
  end
end
